﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;

namespace Pku.BookStore.IServices
{
    [ServiceContract(Name = "ICommentServices", Namespace = "Pku.BookStore.IServices")]
    public interface ICommentServices
    {
        /// <summary>
        /// 增加数据
        /// </summary>
        /// <param name="entity"></param>
        [OperationContract(Name = "Add")]
        int Add(Model.CommentModel entity);

        /// <summary>
        /// 修改数据
        /// </summary>
        /// <param name="entity"></param>
        [OperationContract(Name = "Modify")]
        bool Modify(Model.CommentModel entity);

        /// <summary>
        /// 查询
        /// </summary>
        /// <returns></returns>
        [OperationContract(Name = "Search")]
        List<Model.CommentModel> Search(Model.CommentParam param);

        /// <summary>
        ///  获取实体
        /// </summary>
        /// <param name="commentID"></param>
        /// <returns></returns>
        [OperationContract(Name = "GetEntityById")]
        Model.CommentModel GetEntityById(int commentID);

        /// <summary>
        /// 是否存在
        /// </summary>
        /// <param name="Str">关键字</param>
        /// <returns></returns>
        [OperationContract(Name = "Exist")]
        bool Exist(int BookID, int UserID);

        /// <summary>
        /// 获取总数
        /// </summary>
        /// <param name="param"></param>
        /// <returns></returns>
        [OperationContract(Name = "GetCount")]
        int GetCount(Model.PublisherParam param);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="CategoryID"></param>
        /// <returns></returns>
        [OperationContract(Name = "Delete")]
        bool Delete(int CommentID);

    }
}
